-- GENERATED SPELL FOR [Thaurissan Agent] --


function spell0_7038(pUnit, Event) --@Gouge,n/a--
pUnit:FullCastSpellOnTarget(12540,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_7038', 4267, 1)
end

function spell1_7038(pUnit, Event) --@Piercing Shot,n/a--
pUnit:FullCastSpellOnTarget(6685,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_7038', 15000, 1)
end

function spell2_7038(pUnit, Event) --@Shoot,n/a--
pUnit:FullCastSpellOnTarget(6660,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_7038', 573, 1)
end

function Sorts_7038(pUnit, Event)
local choix_sorts_7038 = math.random(0, 2)
if choix_sorts_7038 == 0 then
pUnit:RegisterEvent('spell0_7038', 1, 1)
end
if choix_sorts_7038 == 1 then
pUnit:RegisterEvent('spell1_7038', 1, 1)
end
if choix_sorts_7038 == 2 then
pUnit:RegisterEvent('spell2_7038', 1, 1)
end
end

function mob7038_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_7038', math.random(1500, 3000), 1)
end

function mob7038_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob7038_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob7038_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(7038, 1, 'mob7038_Action')
RegisterUnitEvent(7038, 2, 'mob7038_Leave')
RegisterUnitEvent(7038, 3, 'mob7038_Kill')
RegisterUnitEvent(7038, 4, 'mob7038_Die')
